<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Title</title>
</head>
<body>

<script>
/*
 function Person(name,age){
    this.name = name;
    this.age = age;
  }

  Person.prototype.running = function (){
    console.log(`${this.name},${this.age},"running"`)
  }

  var p = new Person('wang',18)
  console.log(p);
  p.running()

  */

/*

class Person{
  constructor(name,age) {
    this.name = name;
    this.age = age;
  }

  run(){
    console.log(`${this.name} , ${this.age}`)
  }
}

const p = new Person('wangyang',18)
console.log(p)

p.run()

*/

//  继承


</script>
</body>
</html>